package com.raft.core.log.snapshot;

import java.io.Serializable;
import java.util.Set;

import com.raft.core.node.NodeEndpoint;

/**包含最后一条日志的index和term，和集群成员列表
 * @author zhangsulei
 *
 */
public class SnapshotHeader implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 8839004950554967746L;
	private int lastIndex;
    private int lastTerm;
    private Set<NodeEndpoint> lastConfig;

	public SnapshotHeader() {
		super();
	}
	public SnapshotHeader(int lastIndex, int lastTerm, Set<NodeEndpoint> lastConfig) {
		super();
		this.lastIndex = lastIndex;
		this.lastTerm = lastTerm;
		this.lastConfig = lastConfig;
	}
	public int getLastIndex() {
		return lastIndex;
	}
	public void setLastIndex(int lastIndex) {
		this.lastIndex = lastIndex;
	}
	public int getLastTerm() {
		return lastTerm;
	}
	public void setLastTerm(int lastTerm) {
		this.lastTerm = lastTerm;
	}
	public Set<NodeEndpoint> getLastConfig() {
		return lastConfig;
	}
	public void setLastConfig(Set<NodeEndpoint> lastConfig) {
		this.lastConfig = lastConfig;
	}

}
